"It is not sunny this afternoon and it is colder than yesterday."
"We will go swimming only if it is sunny."
"If we do not go swimming, than we will take a canoe trip."
"If we take a canoe trip, then we will be home by sunset." ∴ "We will be home by sunset."
We set p= "It is sunny this afternoon." q= "It is colder than yesterday" r= "We will go swimming" s= "We will take a canoe trip" t= "We will be home by sunset"
Note: "Only if" is one-directional 1:2:3:4:¬p∧qr⟹p¬r⟹ss⟹tt 5:6:7:8:¬p¬rstfrom 1 and simplificationfrom 2 and 5 and Modus tollensfrom 3 and 6 and Modus ponensfrom 4 and 7 and Modus ponens
Direct proof: Check if proposition q is True by starting with proposition q that we know is true, and use conditional statements to reach q p1⟹p2⟹⋯⟹q
Example 2.2: Direct Proof
Natural number N is even if there is a natural number k s.t. N=2k
Proposition: If N and M are even then N−M is also even
Proof: Because N and M are even, ∃k,l s.t. N=2k and M=2l. Then, N−M=2k−2l=2(k−l). ■
This is technically an incorrect proof because the definition of even only coners natural numbers, so if k−l<0, the logic doesn't hold. Therefore, it is important to establish proper definitions (in this case that k can be any integer, positive or negative)
Counterexamples: Check if proposition q is False by finding a single false example (something can't be true for allx if its for any any onex)
similar, proof by example: e.g. Show that there exists an even number that is not divisible by 4
contrapositive: Using the fact that (p⟹q)≡(¬q⟹¬p), we prove ¬q⟹¬p to indirectly prove that p⟹q
Example 2.3: Proof by Contrapositive
Show that if n2 is odd, then n is odd.
We prove by proving the contrapositive, i.e. if n is even, n2 is even.
Let n=2k for some integer k. Then n2=(2k)2=2(2k2). Since 2k2 is an integer, n2 is even. ■
Direct Proof variant
Let n2=2k+1 for some integer k. Then n2−1=2k⟹(n−1)(n+1)=2k thus n−1 or n+1 must be even, but since their difference is 2, both must be even. Thus, n must be an odd integer. ■
proof by cases
To prove something for all x (∀x), split the domain of x into subsets C1,...,Ck and check P(x) is true ∀x in each Ci
Example 2.4: Proof by Cases
Show that if x<−1 or x>1, then ∣x∣>1.
Case 1: x>1
This is obvious.
Case 2: x<−1
Then x is negative, so the absolute value ∣x∣=−x. So ∣x∣>−(−1)=1.
Thus, in all possible cases, ∣x∣>1. ■
Proof by construction
show something exists by explaining how it could be made- but without necessarily constructing it explicitly
Example 2.5: Proof by Construction
Show that there exists irrational numbers x,y such that xy is rational 2 is irrational. Consider 22. If this is rational, we take x=y=2 and we are done. Otherwise, take (22)2=22=2, and we are stilll done. ■
Proof by contradiction: prove something by showing that the opposite leads to a contradiction (see below)
Proof by Contradiction
Show that if "n2 is odd" (p), then "n is odd" (q)
To show p⟹q, can show ¬q⟹¬p (contrapositive), but under Proof by Contradiction:
Assume n is even [¬ (n is odd)]. Then by the definition of even numbers, n=2k for some k∈Z. Thus, n2=(2k)2=2(2k2) is also even, which contradicts our statement. Hence, our assumption is false and n is odd.
Example 2.6: Infinite Primes
Show that there are infinitely many prime numbers.
Proof by contradiction:
Assume there are finitely many primes, p1,p2,...,pN. (If we can find just one more, we contradict the statement) Consider K=p1p2⋯pN+1. This is a natural number. If K is prime, then K>pi for 1≤i≤N, so we have a new prime number, contradicting the statement that there are only N primes. If K is not prime, then there is a prime q that divides K. However, q=pi for all 1≤i≤N (can be proven by contradiction). Thus, we have a new prime number.
In both cases, we found a new prime number. Hence, our assumption that there are finitely many prime numbers is false, proving our theorem.
Example 2.7: Irrationality of 2
Prove 2 is irrational.
Suppose 2 is rational. Then it can be expressed as a fraction nm where m,n∈Z, n=0 and gcd(m,n)=1. Squaring both sides and clearing the denominator gives 2n2=m2. Since m2 is even, m must also be even, so m=2k for some integer k. Thus,2n2=(2k)2⟹n2=2k2. Since n2 is even, n must also be even, so n=2l for some l. However, this makes gcd(m,n)=2, a contradiction. Therefore, 2 must be irrational.
Proof Tip
Finding an invariant quantity.
Example 2.8
Suppose you are moving on the plane according to the following rule:
From point (x,y), you go to (0.6x+0.8y,0.8x−0.6y)
If you start at the origin, can you reach (1,1)?
No, because (0,0) maps to itself.
Can you reach (1,1) from (0.5,0.5)?
(0.6x+0.8y)2+(0.8x−0.6y)2=x2+y2, so no matter how many times you move, the quantity x2+y2 is invariant.
At (1,1), this quantity is 12+12=1. At (0.5,0.5), this quantity is 0.52+0.52=0.5, which are different, so no.